﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SqlMiM.Common.ViewModel;
using SqlMiM.Common.Interfaces;
using SqlMiM.Common.Framework.UserInterfaces;
using System.Collections.ObjectModel;
using SqlMiM.Common.Themes;
using MvvmFoundation.Wpf;

namespace SqlMiM.Common.Options
{
    public sealed class ThemeOptionsView : ObservableObject
    {

        private ObservableCollection<Theme> themes;
        private Theme selectedTheme;

        /// <summary>
        /// Selected Theme
        /// </summary>
        public Theme SelectedTheme
        {
            get
            {
                return selectedTheme;
            }
            set
            {
                selectedTheme = value;
                this.RaisePropertyChanged("Themes");
            }
        }

        /// <summary>
        /// All Themes
        /// </summary>
        public ObservableCollection<Theme> Themes
        {
            get
            {
                return themes;
            }
            set
            {
                themes = value;
                this.RaisePropertyChanged("Themes");
            }
        }


        public ThemeOptionsView()
        {
            this.Themes = new ObservableCollection<Theme>();

            foreach (var t in ThemesServices.Current.Themes)
                this.Themes.Add(t);

            this.SelectedTheme = ThemesServices.Current.ActiveTheme;
        }


    }


}
